videoio: fix build with FFmpeg 9 after AVCodec::pix_fmts and supported_framerates removal FFmpeg 9 removes AVCodec::pix_fmts and AVCodec::supported_framerates, which were deprecated in FFmpeg 7.1 (libavcodec 61.13.100) in favour of avcodec_get_supported_config(). Query both lists through avcodec_get_supported_config() when building against libavcodec 61.13.100 or newer; that call also reports the number of entries, so the loops iterate by count instead of relying on the old sentinel terminator. FFmpeg older than 7.1 keeps the previous direct field access. The ffmpeg 7.1 in trixie and 8.x in unstable already take the new code path. . Backport of the three commits of upstream PR #29533 (merged into the 4.x branch on 2026-08-11, not yet in any release tag), ported by hand because 4.10.0 predates later 4.x changes to these files: . https://github.com/opencv/opencv/commit/
700cd32ffd59ed3c6f6aec1919867653d8b125ea https://github.com/opencv/opencv/commit/
83ed22ca2800267050a4a9a94afab605c990c0e0 https://github.com/opencv/opencv/commit/
c0166c617d765ac707dde6b9acd8cfcd49751049
Origin: backport, https://github.com/opencv/opencv/pull/29533
Bug: https://github.com/opencv/opencv/issues/29504
Bug: https://github.com/opencv/opencv/issues/29655
Bug-Debian: https://bugs.debian.org/
1144031
Forwarded: not-needed
Reviewed-by: Aron Xu <aron@debian.org>
Last-Update: 2026-09-19
Gbp-Pq: Name ffmpeg-9.0-compat.patch